layui.use(['laypage','form','layer'], function(){
    var laypage = layui.laypage;
    var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句

    laypage.render({
        elem: 'data_pool_page'
        ,count: 1000
        ,layout: ['limit', 'prev', 'page', 'next']
    });

    //触发事件
    var layerActive = {//弹框方法
        notice: function(){
            //示范一个公告层
            layer.open({
                type: 1
                ,title: '催报' //不显示标题栏
                ,closeBtn: true
                ,area: '500px;'
                ,shade: 0.5
                ,id: 'layuipro-report' //设定一个id，防止重复弹出
                ,btn: ['点击催报', '取消']
                ,btnAlign: 'c'
                ,moveType: 1 //拖拽模式，0或者1
                ,content: $("#layer-report").html()
                ,success: function(layero){
                    console.log('已经填报')
                }
            });
        }
    };

    $('#listtable .layui-btn').on('click', function(){//执行弹框事件
        var othis = $(this), method = othis.data('method');
        layerActive[method] ? layerActive[method].call(this, othis) : '';
    });

});
